from PyQt5.QtCore import Qt

from PyQt5.QtWidgets import QMainWindow, QWidget, QHBoxLayout, QSplitter

from image_view import ImageView
from table_view import TableView


class MainWindow(QMainWindow):

    def __init__(self):
        super().__init__()

        self.setWindowTitle('WxImgViewer v1.0')

        self.createWidgets()
        self.layoutWidgets()

    def createWidgets(self):
        self.tableView = TableView()
        self.imageView = ImageView()

    def layoutWidgets(self):
        splitter = QSplitter()

        splitter.addWidget(self.tableView)
        splitter.addWidget(self.imageView)

        splitter.setStretchFactor(0, 1)
        splitter.setStretchFactor(1, 2)

        self.setCentralWidget(splitter)
